package com.laowang.project.system.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.laowang.framework.aspectj.lang.annotation.Excel;
import com.laowang.framework.web.domain.PageObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 商品对象 my_goods
 *
 * @author laowang
 * @date 2023-07-19
 */
@NoArgsConstructor
@Data
public class MyGoods extends PageObject implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 商品ID
     */
    @ApiModelProperty(value = "${comment}", required = false)
    private Integer id;

    /**
     * 商品编码
     */
    @Excel(name = "商品编码")
    @ApiModelProperty(value = "商品编码", required = false)
    private String bn;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    @ApiModelProperty(value = "商品名称", required = false)
    private String name;

    /**
     * 商品简介
     */
    @Excel(name = "商品简介")
    @ApiModelProperty(value = "商品简介", required = false)
    private String brief;

    /**
     * 商品价格
     */
    @Excel(name = "商品价格")
    @ApiModelProperty(value = "商品价格", required = false)
    private BigDecimal price;

    /**
     * 成本价
     */
    @Excel(name = "成本价")
    @ApiModelProperty(value = "成本价", required = false)
    private BigDecimal costprice;

    /**
     * 市场价
     */
    @Excel(name = "市场价")
    @ApiModelProperty(value = "市场价", required = false)
    private BigDecimal mktprice;

    /**
     * 默认图片 图片id
     */
    @Excel(name = "默认图片 图片id")
    @ApiModelProperty(value = "默认图片 图片id", required = false)
    private String imageId;

    /**
     * 商品分类ID 关联category.id
     */
    @Excel(name = "商品分类ID 关联category.id")
    @ApiModelProperty(value = "商品分类ID 关联category.id", required = false)
    private Integer goodsCatId;

    /**
     * 商品类别ID 关联goods_type.id
     */
    @Excel(name = "商品类别ID 关联goods_type.id")
    @ApiModelProperty(value = "商品类别ID 关联goods_type.id", required = false)
    private Integer goodsTypeId;

    /**
     * 品牌ID 关联brand.id
     */
    @Excel(name = "品牌ID 关联brand.id")
    @ApiModelProperty(value = "品牌ID 关联brand.id", required = false)
    private Integer brandId;

    /**
     * 虚拟正常商品 1=正常 2=虚拟
     */
    @Excel(name = "虚拟正常商品 1=正常 2=虚拟")
    @ApiModelProperty(value = "虚拟正常商品 1=正常 2=虚拟", required = false)
    private Integer isNomalVirtual;

    /**
     * 上架标志 1=上架 2=下架
     */
    @Excel(name = "上架标志 1=上架 2=下架")
    @ApiModelProperty(value = "上架标志 1=上架 2=下架", required = false)
    private Integer marketable;

    /**
     * 库存
     */
    @Excel(name = "库存")
    @ApiModelProperty(value = "库存", required = false)
    private Integer stock;

    /**
     * 冻结库存
     */
    @Excel(name = "已售数量")
    @ApiModelProperty(value = "已售数量", required = false)
    private Integer freezeStock;

    /**
     * 重量
     */
    @Excel(name = "重量")
    @ApiModelProperty(value = "重量", required = false)
    private BigDecimal weight;

    /**
     * 商品单位
     */
    @Excel(name = "商品单位")
    @ApiModelProperty(value = "商品单位", required = false)
    private String unit;

    /**
     * 商品详情
     */
    @Excel(name = "商品详情")
    @ApiModelProperty(value = "商品详情", required = false)
    private String intro;

    /**
     * 商品规格序列号存储
     */
    @Excel(name = "商品规格序列号存储")
    @ApiModelProperty(value = "商品规格序列号存储", required = false)
    private String spesDesc;

    /**
     * 参数序列化
     */
    @Excel(name = "参数序列化")
    @ApiModelProperty(value = "参数序列化", required = false)
    private String params;

    /**
     * 评论次数
     */
    @Excel(name = "评论次数")
    @ApiModelProperty(value = "评论次数", required = false)
    private Integer commentsCount;

    /**
     * 浏览次数
     */
    @Excel(name = "浏览次数")
    @ApiModelProperty(value = "浏览次数", required = false)
    private Integer viewCount;

    /**
     * 购买次数
     */
    @Excel(name = "购买次数")
    @ApiModelProperty(value = "购买次数", required = false)
    private Integer buyCount;

    /**
     * 上架时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "上架时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "上架时间", required = false)
    private Date uptime;

    /**
     * 下架时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "下架时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "下架时间", required = false)
    private Date downtime;

    /**
     * 商品排序 越小越靠前
     */
    @Excel(name = "商品排序 越小越靠前")
    @ApiModelProperty(value = "商品排序 越小越靠前", required = false)
    private Integer sort;

    /**
     * 是否推荐，1是，2不是推荐
     */
    @Excel(name = "是否推荐，1是，2不是推荐")
    @ApiModelProperty(value = "是否推荐，1是，2不是推荐", required = false)
    private Integer isRecommend;

    /**
     * 是否热门，1是，2否
     */
    @Excel(name = "是否热门，1是，2否")
    @ApiModelProperty(value = "是否热门，1是，2否", required = false)
    private Integer isHot;

    /**
     * 标签id逗号分隔
     */
    @Excel(name = "标签id逗号分隔")
    @ApiModelProperty(value = "标签id逗号分隔", required = false)
    private String labelIds;

    /**
     * 自定义规格名称
     */
    @Excel(name = "自定义规格名称")
    @ApiModelProperty(value = "自定义规格名称", required = false)
    private String newSpec;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间", required = false)
    private Date ctime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "更新时间", required = false)
    private Date utime;

    /**
     * 删除标志 有数据表示删除
     */
    @Excel(name = "删除标志 有数据表示删除")
    @ApiModelProperty(value = "删除标志 有数据表示删除", required = false)
    private Integer isdel;

    /**
     * $column.columnComment
     */
    @Excel(name = "删除标志 有数据表示删除")
    @ApiModelProperty(value = "删除标志 有数据表示删除", required = false)
    private Integer isCombo;
    private Integer jinbi;
    private Integer jifen;

    /** 0否,1是 */
    @Excel(name = "0否,1是")
    @ApiModelProperty(value = "0否,1是", required = false)
    private Integer vipOnly;

    /** 月购买次数,0为无限制 */
    @Excel(name = "月购买次数,0为无限制")
    @ApiModelProperty(value = "月购买次数,0为无限制", required = false)
    private Integer monthNum;

    /** 年购买次数,0为无限制 */
    @Excel(name = "年购买次数,0为无限制")
    @ApiModelProperty(value = "年购买次数,0为无限制", required = false)
    private Integer yearNum;


    private Integer instantDeath;//1秒杀,0非

    /** 秒杀开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //@Excel(name = "秒杀开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "秒杀开始时间", required = false)
    private Date startTime;

    /** 秒杀结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //@Excel(name = "秒杀结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "秒杀结束时间", required = false)
    private Date endTime;
}
